package edu.shu.springmybatis.service;

import edu.shu.springmybatis.beans.Account;
import edu.shu.springmybatis.dao.AccountDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("accountService")
@Transactional
public class AccountService {

    @Autowired
    AccountDao accountDao;

    public List<Account> findById(Account account)
    {
        List<Account> byId = accountDao.findById(account);
        return byId;
    }

    public void insert(Account account)
    {
        accountDao.insert(account);
    }


}
